home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / toolkitcomps / nsICommandLineRunner.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  161 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsICommandLineRunner.idl
  3.  */
  4.  
  5. #ifndef __gen_nsICommandLineRunner_h__
  6. #define __gen_nsICommandLineRunner_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsICommandLine_h__
  14. #include "nsICommandLine.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21.  
  22. /* starting interface:    nsICommandLineRunner */
  23. #define NS_ICOMMANDLINERUNNER_IID_STR "c1f4cfbf-a41f-4628-aa6c-9fb914478af8"
  24.  
  25. #define NS_ICOMMANDLINERUNNER_IID \
  26.   {0xc1f4cfbf, 0xa41f, 0x4628, \
  27.     { 0xaa, 0x6c, 0x9f, 0xb9, 0x14, 0x47, 0x8a, 0xf8 }}
  28.  
  29. /**
  30.  * Extension of nsICommandLine that allows for initialization of new command lines
  31.  * and running the command line actions by processing the command line handlers.
  32.  *
  33.  * @status INTERNAL - This interface is not meant for use by embedders, and is
  34.  *                    not intended to be frozen. If you are an embedder and need
  35.  *                    functionality provided by this interface, talk to Benjamin
  36.  *                    Smedberg <benjamin@smedbergs.us>.
  37.  */
  38. class NS_NO_VTABLE nsICommandLineRunner : public nsICommandLine {
  39.  public: 
  40.  
  41.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOMMANDLINERUNNER_IID)
  42.  
  43.   /**
  44.    * This method assumes a native character set, and is meant to be called
  45.    * with the argc/argv passed to main(). Talk to bsmedberg if you need to
  46.    * create a command line using other data. argv will not be altered in any
  47.    * way.
  48.    *
  49.    * @param workingDir The working directory for resolving file and URI paths.
  50.    * @param state      The nsICommandLine.state flag.
  51.    */
  52.   /* void init (in long argc, in nsCharPtrArray argv, in nsIFile workingDir, in unsigned long state); */
  53.   NS_IMETHOD Init(PRInt32 argc, char* * argv, nsIFile *workingDir, PRUint32 state) = 0;
  54.  
  55.   /**
  56.    * Set the windowContext parameter.
  57.    */
  58.   /* void setWindowContext (in nsIDOMWindow aWindow); */
  59.   NS_IMETHOD SetWindowContext(nsIDOMWindow *aWindow) = 0;
  60.  
  61.   /**
  62.    * Process the command-line handlers in the proper order, calling "handle()" on
  63.    * each.
  64.    *
  65.    * @throws NS_ERROR_ABORT if any handler throws NS_ERROR_ABORT. All other errors
  66.    *         thrown by handlers will be silently ignored.
  67.    */
  68.   /* void run (); */
  69.   NS_IMETHOD Run(void) = 0;
  70.  
  71.   /**
  72.    * Process and combine the help text provided by each command-line handler.
  73.    */
  74.   /* readonly attribute AUTF8String helpText; */
  75.   NS_IMETHOD GetHelpText(nsACString & aHelpText) = 0;
  76.  
  77. };
  78.  
  79. /* Use this macro when declaring classes that implement this interface. */
  80. #define NS_DECL_NSICOMMANDLINERUNNER \
  81.   NS_IMETHOD Init(PRInt32 argc, char* * argv, nsIFile *workingDir, PRUint32 state); \
  82.   NS_IMETHOD SetWindowContext(nsIDOMWindow *aWindow); \
  83.   NS_IMETHOD Run(void); \
  84.   NS_IMETHOD GetHelpText(nsACString & aHelpText); 
  85.  
  86. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  87. #define NS_FORWARD_NSICOMMANDLINERUNNER(_to) \
  88.   NS_IMETHOD Init(PRInt32 argc, char* * argv, nsIFile *workingDir, PRUint32 state) { return _to Init(argc, argv, workingDir, state); } \
  89.   NS_IMETHOD SetWindowContext(nsIDOMWindow *aWindow) { return _to SetWindowContext(aWindow); } \
  90.   NS_IMETHOD Run(void) { return _to Run(); } \
  91.   NS_IMETHOD GetHelpText(nsACString & aHelpText) { return _to GetHelpText(aHelpText); } 
  92.  
  93. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  94. #define NS_FORWARD_SAFE_NSICOMMANDLINERUNNER(_to) \
  95.   NS_IMETHOD Init(PRInt32 argc, char* * argv, nsIFile *workingDir, PRUint32 state) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(argc, argv, workingDir, state); } \
  96.   NS_IMETHOD SetWindowContext(nsIDOMWindow *aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWindowContext(aWindow); } \
  97.   NS_IMETHOD Run(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Run(); } \
  98.   NS_IMETHOD GetHelpText(nsACString & aHelpText) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHelpText(aHelpText); } 
  99.  
  100. #if 0
  101. /* Use the code below as a template for the implementation class for this interface. */
  102.  
  103. /* Header file */
  104. class nsCommandLineRunner : public nsICommandLineRunner
  105. {
  106. public:
  107.   NS_DECL_ISUPPORTS
  108.   NS_DECL_NSICOMMANDLINERUNNER
  109.  
  110.   nsCommandLineRunner();
  111.  
  112. private:
  113.   ~nsCommandLineRunner();
  114.  
  115. protected:
  116.   /* additional members */
  117. };
  118.  
  119. /* Implementation file */
  120. NS_IMPL_ISUPPORTS1(nsCommandLineRunner, nsICommandLineRunner)
  121.  
  122. nsCommandLineRunner::nsCommandLineRunner()
  123. {
  124.   /* member initializers and constructor code */
  125. }
  126.  
  127. nsCommandLineRunner::~nsCommandLineRunner()
  128. {
  129.   /* destructor code */
  130. }
  131.  
  132. /* void init (in long argc, in nsCharPtrArray argv, in nsIFile workingDir, in unsigned long state); */
  133. NS_IMETHODIMP nsCommandLineRunner::Init(PRInt32 argc, char* * argv, nsIFile *workingDir, PRUint32 state)
  134. {
  135.     return NS_ERROR_NOT_IMPLEMENTED;
  136. }
  137.  
  138. /* void setWindowContext (in nsIDOMWindow aWindow); */
  139. NS_IMETHODIMP nsCommandLineRunner::SetWindowContext(nsIDOMWindow *aWindow)
  140. {
  141.     return NS_ERROR_NOT_IMPLEMENTED;
  142. }
  143.  
  144. /* void run (); */
  145. NS_IMETHODIMP nsCommandLineRunner::Run()
  146. {
  147.     return NS_ERROR_NOT_IMPLEMENTED;
  148. }
  149.  
  150. /* readonly attribute AUTF8String helpText; */
  151. NS_IMETHODIMP nsCommandLineRunner::GetHelpText(nsACString & aHelpText)
  152. {
  153.     return NS_ERROR_NOT_IMPLEMENTED;
  154. }
  155.  
  156. /* End of implementation class template. */
  157. #endif
  158.  
  159.  
  160. #endif /* __gen_nsICommandLineRunner_h__ */
  161.